﻿@model LetLord.ViewModels.BasicPropertySearchViewModel

@using (Ajax.BeginForm("AdvancedPropertySearch", "Search", FormMethod.Post,
                        new AjaxOptions
                        {
                            InsertionMode = InsertionMode.Replace,
                            HttpMethod = "POST",
                            UpdateTargetId = "advanced-property-search-results"
                            // ajax loader
                        }))
{ 
    @Html.ValidationSummary(true)
    @Html.AntiForgeryToken()
    <div class="row-fluid">
        <div class="span6">
            @Html.Bootstrap().ControlGroup().DropDownListFor(x => x.County, new SelectList(LetLord.ViewModels.BasicPropertySearchViewModel.Counties)).Size(InputSize.Medium).Label().ShowRequiredStar(false)
            @Html.Bootstrap().ControlGroup().DropDownListFor(x => x.PropertyType, new SelectList(Enum.GetValues(typeof(LetLord.ViewModels.PropertyType)))).Size(InputSize.Medium).Label().ShowRequiredStar(false)
            @Html.Bootstrap().ControlGroup().DropDownListFor(x => x.MinPrice, new SelectList(LetLord.ViewModels.QuickPropertySearchViewModel.Prices)).Size(InputSize.Medium).Label().ShowRequiredStar(false)
            @Html.Bootstrap().ControlGroup().DropDownListFor(x => x.MaxPrice, new SelectList(LetLord.ViewModels.QuickPropertySearchViewModel.Prices)).Size(InputSize.Medium).Label().ShowRequiredStar(false)
            @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.SizeSquareMeters).Size(InputSize.Mini).Label().LabelText("Size Sq. Mtrs.")
        </div>
        <div class="span6">
            @Html.Bootstrap().ControlGroup().DropDownListFor(x => x.NumberOfBedrooms, new SelectList(LetLord.ViewModels.QuickPropertySearchViewModel.NumBeds)).Size(InputSize.Small).Label().LabelText("Bedrooms").ShowRequiredStar(false)
            @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.NumberOfBathrooms).Size(InputSize.Mini).Label().LabelText("Bathrooms")
            @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.NumberOfReceptionRooms).Size(InputSize.Mini).Label().LabelText("Reception Rooms")
            @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.HasBackGarden).Label().LabelText("Back Garden").ShowRequiredStar(false)
            @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.HasFrontGarden).Label().LabelText("Front Garden").ShowRequiredStar(false)
            @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.HasSecureParking).Label().LabelText("Secure Parking").ShowRequiredStar(false)
            @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.IsDisabledFriendly).Label().LabelText("Disabled Access").ShowRequiredStar(false)
        </div>
        <div>
            <input type="submit" value="Search" class="btn btn-large btn-inverse" id="btn-advanced-search" />
        </div>
    </div> 
}


